Create and adjust the shadows

Now that your project and objects that cast shadows are set, in this step you first create and adjust the camera that works as the light source that casts shadows, then you adjust the Shadow Map Composer to create the shadows you need in your project.

Create and adjust the camera that casts shadows

  1. In the Project create a Camera that casts shadows.
    Create as many cameras in a scene as there are shadow maps. However, make sure that the shader can handle multiple shadow maps.
  2. In the Properties click Add Properties, add the Shadow Caster Camera property, and enable it.
  3. In the Preview select the camera that casts shadow in the Show drop-down menu.
    If you are using the Edit mode, exit the Edit mode to see your scene from the shadow camera.
  4. Place the camera in the scene to the position from where you want the light for the shadows to come.
    For example, to create shadows below the objects, place the shadow camera above the objects.

  5. In the Preview select the camera through which you view the scene in the Show drop-down menu.
    If you are using the Edit mode, exit the Edit mode to see your scene from the main camera.
  6. In the Project select the shadow camera and in the Properties set Z Near and Z Far properties to values as close as possible to the scene size.
    For example, set:

Adjust the dynamic shadow settings

After setting up your project and objects for dynamic shadows, adjust the shadows until you get the result you need.

To adjust shadows:

< PREVIOUS STEP

What's next?

In this tutorial you learned how to create dynamic shadows in Kanzi Studio. Now you can:

See also

To learn more about creating Kanzi applications, see Tutorials.

To find out more about Kanzi Studio features, see Working with ....

To find out more about the shadow map composer, see Using the shadow map composer.

To find out more about how to use composers, see Composers.

To find out more about placing cameras in your applications, see Setting the position of cameras in the Preview.